import {Module} from '@nestjs/common';
import {CommonRedisModule} from './module/common/common.redis.module'
import {CommonRequestModule} from './module/common/common.request.module'
import {CommonMysqlModule} from './module/common/common.mysql.module';
import { APP_GUARD } from '@nestjs/core';
import { WsGateway } from './ws.gateway';
import { AuthGuard } from './auth.guard';
import {CommonRedisService} from './service/common.redis.service';
import {ConfigService} from './service/config.service';

@Module({
    imports: [
        CommonRequestModule,
        CommonRedisModule,
        CommonMysqlModule,
    ],
    providers: [
        WsGateway,
        CommonRedisService,
        {
            provide: APP_GUARD,
            useClass: AuthGuard,
        },
        ConfigService,
    ],
    exports: [ConfigService]
})
export class AppModule {
}
